package com.saas.tenant.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.saas.tenant.annotation.DataSourceSwitch;
import com.saas.tenant.config.DataSourceType;
import com.saas.tenant.entity.User;
import com.saas.tenant.mapper.UserMapper;
import com.saas.tenant.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * @auther Jiang Tian
 * @date 2025/2/28
 * @apiNote
 **/
@Service("secondaryUserService")
public class SecondaryUserServiceImpl extends ServiceImpl<UserMapper, User> implements UserService {

    @Autowired
    UserMapper userMapper;

    @DataSourceSwitch(DataSourceType.SECONDARY)
    public List<Map<String,Object>> selectUserInfo(){
        return userMapper.selectUserInfo();
    }
}
